package org.rednebula.framework.core.model;

import org.rednebula.framework.core.utils.InternalConstant;


public class RequestType {


	String v;
	
	public static RequestType create=new RequestType(InternalConstant.REQUESTTYPE_CREATE);
	public static RequestType find=new RequestType(InternalConstant.REQUESTTYPE_FIND);
	public static RequestType modify=new RequestType(InternalConstant.REQUESTTYPE_MODIFY);
	public static RequestType delete=new RequestType(InternalConstant.REQUESTTYPE_DELETE);
	

	public RequestType(String v) {
		this.v = v;
	}

	public String getValue() {
		return v;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((v == null) ? 0 : v.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RequestType other = (RequestType) obj;
		if (v == null) {
			if (other.v != null)
				return false;
		} else if (!v.equals(other.v))
			return false;
		return true;
	}
	
/*	CREATE("CREATE"), FIND("FIND"), MODIFY("MODIFY"), DELETE("DELETE"), OTHER(
	"OTHER");*/
}
